package com.lucifer.d.security.data.config;

import com.lucifer.d.security.data.annotation.UUID;
import com.lucifer.d.security.data.enums.DataCompletionEnum;
import com.lucifer.d.security.data.enums.DataPremiseEnum;
import com.lucifer.d.security.data.enums.DataTypeEnum;
import com.lucifer.d.security.data.model.DataCompletionModel;
import com.lucifer.d.security.data.model.DataConfigModel;
import com.lucifer.d.util.SnowflakeIdWorker;
import lombok.Data;

import java.util.List;

/**
 * @author Lucifer
 * @create 2023 - 08 - 11 12:27
 */
@Data
public class DataCompletionConfig {

    private DataConfigModel model;

    public DataCompletionConfig() {
        model = new DataConfigModel().add(new DataCompletionModel(DataCompletionEnum.OWN, UUID.class, DataPremiseEnum.ADD, SnowflakeIdWorker.class, "nextId", null, null, DataTypeEnum.STRING, true));
    }

    public DataConfigModel value(){
        return this.model;
    }

    public List<DataCompletionModel> model(){
        return model.getList();
    }

}
